package com.tamtamy.jtta.data.xml;

import org.w3c.dom.Document;

import com.tamtamy.jtta.data.GroupDetails;
import com.tamtamy.jtta.utility.XMLUtility;

public class XMLGroupDetails extends GroupDetails {	

	public XMLGroupDetails(Document xmlDocument) {
		super();
		this.id = Long.parseLong(XMLUtility.getString(xmlDocument, "id"));
		this.name = XMLUtility.getString(xmlDocument, "name");
		this.description = XMLUtility.getString(xmlDocument, "description");
		this.creator = XMLUtility.getString(xmlDocument, "creator");
		this.created = XMLUtility.getDate(xmlDocument, "created");
		this.network = XMLUtility.getString(xmlDocument, "network");
		this.contentCounter = Long.parseLong(XMLUtility.getString(xmlDocument, "contentCounter"));;
		this.userCounter = Long.parseLong(XMLUtility.getString(xmlDocument, "userCounter"));;
		this.contents = XMLUtility.getStringList(xmlDocument, "contents", "long");
		this.users = XMLUtility.getStringList(xmlDocument, "users", "string");;
	}
}
